//
//  StatusBottomView.swift
//  MyWeibo
//
//  Created by tanchao on 15/8/6.
//  Copyright © 2015年 chaoren. All rights reserved.
//

import UIKit

class StatusBottomView: UIView {
    /// 数据模型
    var status: Status?
//        {
//        didSet{
//            if status?.reposts_count > 0 {
//                forwardButton.setTitle(" \(status!.reposts_count)", forState: UIControlState.Normal)
//            }
//            if status?.comments_count > 0{
//                commentButton.setTitle(" \(status!.comments_count)", forState: UIControlState.Normal)
//            }
//            if status?.attitudes_count > 0{
//                likeButton.setTitle(" \(status!.attitudes_count)", forState: UIControlState.Normal)
//            }
//        }
//    }
    override init(frame: CGRect) {
        super.init(frame: frame)
        prepareUI()
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
/// 设置UI
    private func prepareUI() {
        backgroundColor = UIColor(white: 0.95, alpha: 1.0)
        addSubview(forwardButton)
        addSubview(commentButton)
        addSubview(likeButton)
        ff_HorizontalTile([forwardButton,commentButton,likeButton], insets: UIEdgeInsetsZero)
    }
    //MARK:- 懒加载控件
 /// 转发
    lazy private var forwardButton: UIButton = UIButton(title: " 转发", imageName: "timeline_icon_retweet")
 /// 评论
    lazy private var commentButton: UIButton = UIButton(title: " 评论", imageName: "timeline_icon_comment")
 /// 点赞
    lazy private var likeButton: UIButton = UIButton(title: " 赞", imageName: "timeline_icon_unlike")

}
